package estaticos;

public class MetodosVariaveisEstaticas {
    public static int a = 1;
    public int b;
    public static double Soma (double ... ns){
        double s = 0;
        for(double n : ns){ s += n;}
        return s;
    }
    
    public static void main(String[] args) {
        MetodosVariaveisEstaticas mve = new MetodosVariaveisEstaticas();
        MetodosVariaveisEstaticas mve1 = new MetodosVariaveisEstaticas();
        
        mve.b = 5;
        System.out.println("a = " + a + " mve.b = " + mve.b );
        mve1.b = 4;
        System.out.println("a = " + a + " mve1.b = " + mve1.b );
        mve.a = 3;
        System.out.println("mve.a = " + a + " mve.b = " + mve.b );
        MetodosVariaveisEstaticas.a = 9;
        System.out.println("MetodosVariaveisEstaticas.a = " + a + " mve.b = " + mve.b );
       
        double d =MetodosVariaveisEstaticas.Soma(2,45,65,3,7,99,0);
        System.out.println("soma com arg variavel = "+d);
        
    }
    
}
